Conventionally, a distributed file system, also referred to as a cluster file system, is a file system that allows access to resources (e.g., files) from multiple hosts that are sharing the file system via a computer network. A cluster file system, or storage cluster, provides a consistent file system image across servers (nodes) in a cluster, allowing the servers to simultaneously read and write to a single shared file system. A storage cluster is capable of implementing the data storage component of highly available systems.
One type of cluster file system is a Global File System 2 (GFS2), which is a shared disk file system for Linux computer clusters. With GFS2, each server, or node, has its own page cache which may contain some portion of the on-disk data from the shared storage. GFS2 uses a locking mechanism called glocks to maintain the integrity of the cache between nodes. The glock subsystem provides a cache management function which is implemented using the distributed lock manager (DLM) as the underlying communication layer. Glocks provide protection for the cache on a per-inode basis. An inode is a data structure on the shared file system that stores all information about a file of the shared file system except its name and its actual data. Each inode has two glocks associated with it. The first glock is used for controlling the caching of data associated with the inode, and the second glock is used to control the lifetime of the inode itself. Each glock has one DLM lock associated with it.
Conventionally, a DLM lock is used, to arbitrate access requests relating to that inode from multiple nodes. In the GFS2 file system these are the unique DLM locks associated with each inode's glock. Each of the DLM locks associated with the inode's glock has a lock value block (LVB), which is a small amount of memory (anywhere from 16 to 32 bytes) that can be written when the DLM lock is held in exclusive mode.
Currently, no efficient inode notification system exists that provides support for POSIX (Portable Operating System Interface [for Unix]) lease. A file lease provides a mechanism whereby the process holding the lease (the “lease holder”) is notified (via delivery of a signal) when a process (the “lease breaker”) tries to open or truncate that file. The lease can only be granted if the inode itself is not open anywhere in the cluster in a particular mode (the mode depends upon the type of lease required). In GFS2, opening a file requires obtaining a shared lock (DLM mode PR) so that holding a lock of an incompatible mode will result in blocking open requests across the cluster. This, however, still does not tell the requesting process whether any other node is holding this lock open.